package railRoad.io;

import railRoad.io.interfaces.IReadeable;
import railRoad.io.interfaces.IWriteble;

/**
 * Abstract class for read/write routine
 * 
 * @see IReadeable
 * @see IWriteble 
 * @author Rukin
 *
 */
public abstract class AbstractReaderWriter implements IReadeable, IWriteble 
{
	/**
	 * Open new work stream. After opening call {@link#close()} to close stream.
	 * @param in  read stream
	 * @param out write stream
	 * @throws Exception
	 */
	public abstract void open(String in, String out) throws Exception;
	
	/**
	 * read routine
	 */
	public abstract void read() throws Exception;

	/**
	 * write routine
	 */
	public abstract void write() throws Exception;
	
	/**
	 * Close work stream
	 * @throws Exception
	 */
	public abstract void close() throws Exception;

}
